Skip to content

Add state badges#169

Merged
lippserd merged 8 commits into
mainfrom
feature/state-badges
Mar 26, 2026
Merged

Add state badges#169
lippserd merged 8 commits into
mainfrom
feature/state-badges

Conversation

@jrauh01

@jrauh01 jrauh01 commented Sep 8, 2025

Copy link
Copy Markdown
Contributor

The whole box color is changed to the state color with the highest precedence (the color of the badge in the center).

Screenshot 2026-02-04 at 09 41 39

Clickable state badges were added to access the corresponding prefiltered lists directly.

  • Clicking on a state badge opens the host/service list filtered by the dimension and state
  • Clicking on the title now directly opens the host/service list filtered only be the dimension (all states included)
Screenshot 2026-02-04 at 09 54 53

Additionally the following has been done:

  • The css has been reformatted
  • Tho code has been modernized by adding types
  • The complete html structure building process is changed from just concatenating strings to using IPL
  • Pending state has been added

This feature only supports Icinga DB, because we don't want to support IDO anymore.

resolve #138
resolve #168

@jrauh01 jrauh01 self-assigned this Sep 8, 2025
@cla-bot cla-bot Bot added the cla/signed label Sep 8, 2025
@jrauh01 jrauh01 force-pushed the feature/state-badges branch 4 times, most recently from df3f101 to 364023a Compare September 10, 2025 12:12
@jrauh01 jrauh01 requested a review from lippserd September 10, 2025 12:22
@lippserd

lippserd commented Feb 3, 2026

Copy link
Copy Markdown
Member

@jrauh01 Please rebase.

@jrauh01 jrauh01 force-pushed the feature/state-badges branch from 364023a to 2bc23ce Compare February 3, 2026 12:48
@jrauh01

jrauh01 commented Feb 4, 2026

Copy link
Copy Markdown
Contributor Author

I added a short PR description, about what has changed.

@BastianLedererIcinga BastianLedererIcinga left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The feature works fine.

Comment thread library/Cube/Web/Widget/DimensionWidget.php Outdated
Comment thread library/Cube/Web/Widget/DimensionWidget.php Outdated
Comment thread library/Cube/Web/Widget/DimensionWidget.php Outdated
Comment thread library/Cube/Web/Widget/HostDimensionWidget.php Outdated
Comment thread library/Cube/Web/Widget/ServiceDimensionWidget.php Outdated
Comment thread public/css/module.less Outdated
Comment thread public/css/state-badges.less
Comment thread README.md
@jrauh01 jrauh01 force-pushed the feature/state-badges branch from 2bc23ce to f7caab8 Compare March 24, 2026 13:11
@jrauh01

jrauh01 commented Mar 24, 2026

Copy link
Copy Markdown
Contributor Author

In addition to the requested changes I rebased this branch on main.

@BastianLedererIcinga BastianLedererIcinga left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good now, @lippserd I'll leave up to you how you want the docs to be adjusted.

@jrauh01 jrauh01 force-pushed the feature/state-badges branch 2 times, most recently from f93366d to fb95383 Compare March 24, 2026 14:45
@jrauh01

jrauh01 commented Mar 24, 2026

Copy link
Copy Markdown
Contributor Author

I just squashed the fixup commits. Temporary change has been undone, so this did not change anything.

@jrauh01 jrauh01 force-pushed the feature/state-badges branch from fb95383 to ef97807 Compare March 25, 2026 06:07
Reformat `module.less` for consistent indentation and add a dedicated
`state-badges.less` stylesheet. Register the new stylesheet in `run.php` so it
is loaded by the module.
@jrauh01 jrauh01 force-pushed the feature/state-badges branch from ef97807 to fcef7f4 Compare March 25, 2026 12:21
jrauh01 added 6 commits March 25, 2026 13:29
Move `makeBadgeHtml()` and `renderIdoCubeBadges()` into the `CubeRenderer` base
class to avoid duplication across host and service renderers. Build on this to
render state summary badges (`ok`, `warning`, `critical`, `unknown`, `up`,
`down`) for Icinga DB backed cubes.
Dimension headers in the cube now link to the corresponding Icinga DB host or
service list, filtered to the current slice. This gives users a quick way to
jump from the cube to the detailed object list.
Replace string-based HTML rendering with ipl-html components. Add PHP type
declarations to properties and methods. Extract dimension rendering into
dedicated `DimensionWidget`, `HostDimensionWidget` and `ServiceDimensionWidget`
classes to separate concerns.
Give handled-state titles a muted color scheme so they are visually distinct
from unhandled states. This makes it easier to spot unhandled problems at a
glance when scanning the cube.
Include the pending state in host and service status cube queries and render it
in the state badge rows.
Display unhandled and handled state badges on separate rows so the cube stays
readable when many states are present. Adjust CSS grid layout accordingly.
@jrauh01 jrauh01 force-pushed the feature/state-badges branch from fcef7f4 to 2256fdc Compare March 25, 2026 12:30
Remove obsolete screenshots that no longer reflect the current UI and add a
single up-to-date overview image. Remove "marketing" stuff from README and About
page.
@jrauh01 jrauh01 force-pushed the feature/state-badges branch from 2256fdc to d66a927 Compare March 25, 2026 12:31
@lippserd lippserd merged commit a082e45 into main Mar 26, 2026
13 checks passed
@lippserd lippserd deleted the feature/state-badges branch March 26, 2026 12:05
@jrauh01 jrauh01 added this to the 1.4.0 milestone Mar 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Change whole box color when everything is acknowledged Host/Service status

3 participants